import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/index',
    children:[
        {
          path: '/index',
          name: 'index',
          component: () => import(/* webpackChunkName: "index" */ '../views/IndexView.vue')
        },
        {
          path: '/course',
          name: 'course',
          component: () => import(/* webpackChunkName: "course" */ '../views/CourseView.vue')
        },
        {
          path: '/record',
          name: 'record',
          component: () => import(/* webpackChunkName: "record" */ '../views/RecordView.vue')
        },
        {
          path: '/practice',
          name: 'practice',
          component: () => import(/* webpackChunkName: "practice" */ '../views/PracticeView.vue')
        },
        {
          path: '/my',
          name: 'my',
          component: () => import(/* webpackChunkName: "my" */ '../views/MyView.vue')
        },
    ]
  },
  {
    path: '/search',
    name: 'search',
    component: () => import(/* webpackChunkName: "my" */ '../components/SearchView.vue')
  },
  {
    path: '/teacherDetail',
    name: 'teacherDetail',
    component: () => import(/* webpackChunkName: "my" */ '../components/TeacherDetail.vue')
  },
  {
    path: '/courseDet',
    name: 'courseDet',
    component: () => import(/* webpackChunkName: "courseDet" */ '../components/Coursedet.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import(/* webpackChunkName: "login" */ '../views/Login.vue')
  },
  {
    path: '/yzlogin',
    name: 'yzlogin',
    component: () => import(/* webpackChunkName: "yzlogin" */ '../views/yzLogin.vue')
  },
  {
    path: '/info',
    name: 'info',
    component: () => import(/* webpackChunkName: "yzlogin" */ '../views/info.vue')
  },
  {
    path: '/infoupdata',
    name: 'infoupdata',
    component: () => import(/* webpackChunkName: "yzlogin" */ '../views/infoUpdata.vue')
  },
  {
    path: '/infoupdataName',
    name: 'infoupdataName',
    component: () => import(/* webpackChunkName: "yzlogin" */ '../views/infoName.vue')
  },
  {
    path: '/calend',
    name: 'calend',
    component: () => import(/* webpackChunkName: "yzlogin" */ '../views/calend.vue')
  },
]

const router = new VueRouter({
  routes
})

export default router
